<?php
/**
 * Created by PhpStorm.
 * Author: sitewang@aliyun.com
 * CreateTime: 2023/11/5 21:10
 * Blog：www.myblogs.xyz
 */

namespace app\agent\validate;

use app\infrastructure\base\BaseValidate;

class LoginValidate extends BaseValidate
{
    protected $rule = [
		'account' => 'require|length:1,20',
		'password' => 'require|length:6,20',
    ];

    protected $message = [
        'account.require' => '账号不能为空',
        'account.length' => '账号长度必须在1-20位之间',
        'password.require' => '密码不能为空',
        'password.length' => '密码长度必须在6-20位之间',
    ];

	/**
	 * @return LoginValidate
	 */
	public function sceneAccount()
	{
		return $this->only(['account','password']);
	}
}